home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / windowwatcher / nsPIWindowWatcher.h < prev   
C/C++ Source or Header  |  2006-05-08  |  9KB  |  183 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsPIWindowWatcher.idl
  3.  */
  4.  
  5. #ifndef __gen_nsPIWindowWatcher_h__
  6. #define __gen_nsPIWindowWatcher_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIDOMWindow; /* forward declaration */
  18.  
  19. class nsISimpleEnumerator; /* forward declaration */
  20.  
  21. class nsIWebBrowserChrome; /* forward declaration */
  22.  
  23. class nsIDocShellTreeItem; /* forward declaration */
  24.  
  25. #include "jspubtd.h"
  26.  
  27. /* starting interface:    nsPIWindowWatcher */
  28. #define NS_PIWINDOWWATCHER_IID_STR "3aaad312-e09d-4010-a013-78ef653dac99"
  29.  
  30. #define NS_PIWINDOWWATCHER_IID \
  31.   {0x3aaad312, 0xe09d, 0x4010, \
  32.     { 0xa0, 0x13, 0x78, 0xef, 0x65, 0x3d, 0xac, 0x99 }}
  33.  
  34. class NS_NO_VTABLE nsPIWindowWatcher : public nsISupports {
  35.  public: 
  36.  
  37.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_PIWINDOWWATCHER_IID)
  38.  
  39.   /** A window has been created. Add it to our list.
  40.       @param aWindow the window to add
  41.       @param aChrome the corresponding chrome window. The DOM window
  42.                      and chrome will be mapped together, and the corresponding
  43.                      chrome can be retrieved using the (not private)
  44.                      method getChromeForWindow. If null, any extant mapping
  45.                      will be cleared.
  46.   */
  47.   /* void addWindow (in nsIDOMWindow aWindow, in nsIWebBrowserChrome aChrome); */
  48.   NS_IMETHOD AddWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome *aChrome) = 0;
  49.  
  50.   /** A window has been closed. Remove it from our list.
  51.       @param aWindow the window to remove
  52.   */
  53.   /* void removeWindow (in nsIDOMWindow aWindow); */
  54.   NS_IMETHOD RemoveWindow(nsIDOMWindow *aWindow) = 0;
  55.  
  56.   /** Like the public interface's open(), but can deal with openDialog
  57.       style arguments.
  58.       @param aParent parent window, if any. Null if no parent.  If it is
  59.              impossible to get to an nsIWebBrowserChrome from aParent, this
  60.              method will effectively act as if aParent were null.
  61.       @param aURL url to which to open the new window. Must already be
  62.              escaped, if applicable. can be null.
  63.       @param aName window name from JS window.open. can be null.
  64.       @param aFeatures window features from JS window.open. can be null.
  65.       @param aDialog use dialog defaults (see nsIDOMWindowInternal::openDialog)
  66.       @param argc count of argv arguments
  67.       @param argv extra JS arguments, if any
  68.                   (see nsIDOMWindowInternal::openDialog)
  69.       @return the new window
  70.   */
  71.   /* nsIDOMWindow openWindowJS (in nsIDOMWindow aParent, in string aUrl, in string aName, in string aFeatures, in boolean aDialog, in PRUint32 argc, in jsvalptr argv); */
  72.   NS_IMETHOD OpenWindowJS(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, PRBool aDialog, PRUint32 argc, jsval * argv, nsIDOMWindow **_retval) = 0;
  73.  
  74.   /**
  75.    * Find a named docshell tree item amongst all windows registered
  76.    * with the window watcher.  This may be a subframe in some window,
  77.    * for example.
  78.    *
  79.    * @param aName the name of the window.  Must not be null.
  80.    * @param aRequestor the tree item immediately making the request.
  81.    *        We should make sure to not recurse down into its findItemWithName
  82.    *        method.
  83.    * @param aOriginalRequestor the original treeitem that made the request.
  84.    *        Used for security checks.
  85.    * @return the tree item with aName as the name, or null if there
  86.    *         isn't one.  "Special" names, like _self, _top, etc, will be
  87.    *         treated specially only if aRequestor is null; in that case they
  88.    *         will be resolved relative to the first window the windowwatcher
  89.    *         knows about.
  90.    * @see findItemWithName methods on nsIDocShellTreeItem and
  91.    *      nsIDocShellTreeOwner
  92.    */
  93.   /* nsIDocShellTreeItem findItemWithName (in wstring aName, in nsIDocShellTreeItem aRequestor, in nsIDocShellTreeItem aOriginalRequestor); */
  94.   NS_IMETHOD FindItemWithName(const PRUnichar *aName, nsIDocShellTreeItem *aRequestor, nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval) = 0;
  95.  
  96. };
  97.  
  98. /* Use this macro when declaring classes that implement this interface. */
  99. #define NS_DECL_NSPIWINDOWWATCHER \
  100.   NS_IMETHOD AddWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome *aChrome); \
  101.   NS_IMETHOD RemoveWindow(nsIDOMWindow *aWindow); \
  102.   NS_IMETHOD OpenWindowJS(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, PRBool aDialog, PRUint32 argc, jsval * argv, nsIDOMWindow **_retval); \
  103.   NS_IMETHOD FindItemWithName(const PRUnichar *aName, nsIDocShellTreeItem *aRequestor, nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval); 
  104.  
  105. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  106. #define NS_FORWARD_NSPIWINDOWWATCHER(_to) \
  107.   NS_IMETHOD AddWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome *aChrome) { return _to AddWindow(aWindow, aChrome); } \
  108.   NS_IMETHOD RemoveWindow(nsIDOMWindow *aWindow) { return _to RemoveWindow(aWindow); } \
  109.   NS_IMETHOD OpenWindowJS(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, PRBool aDialog, PRUint32 argc, jsval * argv, nsIDOMWindow **_retval) { return _to OpenWindowJS(aParent, aUrl, aName, aFeatures, aDialog, argc, argv, _retval); } \
  110.   NS_IMETHOD FindItemWithName(const PRUnichar *aName, nsIDocShellTreeItem *aRequestor, nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval) { return _to FindItemWithName(aName, aRequestor, aOriginalRequestor, _retval); } 
  111.  
  112. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  113. #define NS_FORWARD_SAFE_NSPIWINDOWWATCHER(_to) \
  114.   NS_IMETHOD AddWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome *aChrome) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddWindow(aWindow, aChrome); } \
  115.   NS_IMETHOD RemoveWindow(nsIDOMWindow *aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveWindow(aWindow); } \
  116.   NS_IMETHOD OpenWindowJS(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, PRBool aDialog, PRUint32 argc, jsval * argv, nsIDOMWindow **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->OpenWindowJS(aParent, aUrl, aName, aFeatures, aDialog, argc, argv, _retval); } \
  117.   NS_IMETHOD FindItemWithName(const PRUnichar *aName, nsIDocShellTreeItem *aRequestor, nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindItemWithName(aName, aRequestor, aOriginalRequestor, _retval); } 
  118.  
  119. #if 0
  120. /* Use the code below as a template for the implementation class for this interface. */
  121.  
  122. /* Header file */
  123. class _MYCLASS_ : public nsPIWindowWatcher
  124. {
  125. public:
  126.   NS_DECL_ISUPPORTS
  127.   NS_DECL_NSPIWINDOWWATCHER
  128.  
  129.   _MYCLASS_();
  130.  
  131. private:
  132.   ~_MYCLASS_();
  133.  
  134. protected:
  135.   /* additional members */
  136. };
  137.  
  138. /* Implementation file */
  139. NS_IMPL_ISUPPORTS1(_MYCLASS_, nsPIWindowWatcher)
  140.  
  141. _MYCLASS_::_MYCLASS_()
  142. {
  143.   /* member initializers and constructor code */
  144. }
  145.  
  146. _MYCLASS_::~_MYCLASS_()
  147. {
  148.   /* destructor code */
  149. }
  150.  
  151. /* void addWindow (in nsIDOMWindow aWindow, in nsIWebBrowserChrome aChrome); */
  152. NS_IMETHODIMP _MYCLASS_::AddWindow(nsIDOMWindow *aWindow, nsIWebBrowserChrome *aChrome)
  153. {
  154.     return NS_ERROR_NOT_IMPLEMENTED;
  155. }
  156.  
  157. /* void removeWindow (in nsIDOMWindow aWindow); */
  158. NS_IMETHODIMP _MYCLASS_::RemoveWindow(nsIDOMWindow *aWindow)
  159. {
  160.     return NS_ERROR_NOT_IMPLEMENTED;
  161. }
  162.  
  163. /* nsIDOMWindow openWindowJS (in nsIDOMWindow aParent, in string aUrl, in string aName, in string aFeatures, in boolean aDialog, in PRUint32 argc, in jsvalptr argv); */
  164. NS_IMETHODIMP _MYCLASS_::OpenWindowJS(nsIDOMWindow *aParent, const char *aUrl, const char *aName, const char *aFeatures, PRBool aDialog, PRUint32 argc, jsval * argv, nsIDOMWindow **_retval)
  165. {
  166.     return NS_ERROR_NOT_IMPLEMENTED;
  167. }
  168.  
  169. /* nsIDocShellTreeItem findItemWithName (in wstring aName, in nsIDocShellTreeItem aRequestor, in nsIDocShellTreeItem aOriginalRequestor); */
  170. NS_IMETHODIMP _MYCLASS_::FindItemWithName(const PRUnichar *aName, nsIDocShellTreeItem *aRequestor, nsIDocShellTreeItem *aOriginalRequestor, nsIDocShellTreeItem **_retval)
  171. {
  172.     return NS_ERROR_NOT_IMPLEMENTED;
  173. }
  174.  
  175. /* End of implementation class template. */
  176. #endif
  177.  
  178. // {d535806e-afaf-47d1-8d89-783ad088c62a}
  179. #define NS_PWINDOWWATCHER_IID \
  180.  {0xd535806e, 0xafaf, 0x47d1, {0x8d, 0x89, 0x78, 0x3a, 0xd0, 0x88, 0xc6, 0x2a}}
  181.  
  182. #endif /* __gen_nsPIWindowWatcher_h__ */
  183.